﻿using System;
using System.Runtime.CompilerServices;
using UnityEngine;

namespace Yoozoo.Gameplay.City
{
    [Serializable]
    public class CityPointTypeLod0
    {
        public CityPointType pointType;
        public GameObject mark;
        public Color color = Color.white;
    }
    
    public class CityPointEditor_Lod0 : MonoBehaviour
    {
        [SerializeField]
        private CityPointTypeLod0[] points;

        private static CityPointEditor_Lod0 instance;

        public static CityPointEditor_Lod0 Instance
        {
            get
            {
                if (instance == null)
                    instance = FindObjectOfType<CityPointEditor_Lod0>();

                return instance;
            }
        }

        public CityPointTypeLod0 GetPointData(CityPointType pointType)
        {
            foreach (var point in points)
                if (point.pointType == pointType)
                    return point;

            return null;
        }
    }
}